3.2.74 \(\int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx\) [174]
Optimal. Leaf size=57 \[ -\frac {g (g \cos (e+f x))^{-2 m} \log (1-\sin (e+f x)) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m}{c f} \]
[Out]
-g*ln(1-sin(f*x+e))*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^m/c/f/((g*cos(f*x+e))^(2*m))
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2922, 12, 2746,
31} \begin {gather*} -\frac {g \log (1-\sin (e+f x)) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^m (g \cos (e+f x))^{-2 m}}{c f} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[(g*Cos[e + f*x])^(1 - 2*m)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^(-1 + m),x]
[Out]
-((g*Log[1 - Sin[e + f*x]]*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^m)/(c*f*(g*Cos[e + f*x])^(2*m)))
Rule 12
Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] && !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]
Rule 31
Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]
Rule 2746
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] || !IntegerQ[m + 1/2])
Rule 2922
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) +
(f_.)*(x_)])^(n_), x_Symbol] :> Dist[a^IntPart[m]*c^IntPart[m]*(a + b*Sin[e + f*x])^FracPart[m]*((c + d*Sin[e
+ f*x])^FracPart[m]/(g^(2*IntPart[m])*(g*Cos[e + f*x])^(2*FracPart[m]))), Int[(g*Cos[e + f*x])^(2*m + p)/(c +
d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]
&& EqQ[2*m + p - 1, 0] && EqQ[m - n - 1, 0]
Rubi steps
\begin {align*} \int (g \cos (e+f x))^{1-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-1+m} \, dx &=\left ((g \cos (e+f x))^{-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \int \frac {g \cos (e+f x)}{c-c \sin (e+f x)} \, dx\\ &=\left (g (g \cos (e+f x))^{-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \int \frac {\cos (e+f x)}{c-c \sin (e+f x)} \, dx\\ &=-\frac {\left (g (g \cos (e+f x))^{-2 m} (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m\right ) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,-c \sin (e+f x)\right )}{c f}\\ &=-\frac {g (g \cos (e+f x))^{-2 m} \log (1-\sin (e+f x)) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^m}{c f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(155\) vs. \(2(57)=114\).
time = 70.34, size = 155, normalized size = 2.72 \begin {gather*} \frac {2^m g (g \cos (e+f x))^{-2 m} \cos ^{2 m}\left (\frac {1}{4} (2 e+\pi +2 f x)\right ) \left (4 \log \left (\csc ^2\left (\frac {1}{16} (2 e+7 \pi +2 f x)\right )\right )-\log \left (\tan ^2\left (\frac {1}{16} (-2 e+\pi -2 f x)\right )\right )-2 \log \left (-1+\tan ^2\left (\frac {1}{16} (-2 e+\pi -2 f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^{-2 m} (a (1+\sin (e+f x)))^m (c-c \sin (e+f x))^m}{c f} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[(g*Cos[e + f*x])^(1 - 2*m)*(a + a*Sin[e + f*x])^m*(c - c*Sin[e + f*x])^(-1 + m),x]
[Out]
(2^m*g*Cos[(2*e + Pi + 2*f*x)/4]^(2*m)*(4*Log[Csc[(2*e + 7*Pi + 2*f*x)/16]^2] - Log[Tan[(-2*e + Pi - 2*f*x)/16
]^2] - 2*Log[-1 + Tan[(-2*e + Pi - 2*f*x)/16]^2])*(a*(1 + Sin[e + f*x]))^m*(c - c*Sin[e + f*x])^m)/(c*f*(g*Cos
[e + f*x])^(2*m)*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^(2*m))
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 4.63, size = 8576, normalized size = 150.46
| | |
method |
result |
size |
| | |
risch |
\(\text {Expression too large to display}\) |
\(8576\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x,method=_RETURNVERBOSE)
[Out]
result too large to display
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x, algorithm="maxima")
[Out]
integrate((g*cos(f*x + e))^(-2*m + 1)*(a*sin(f*x + e) + a)^m*(-c*sin(f*x + e) + c)^(m - 1), x)
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 31, normalized size = 0.54 \begin {gather*} -\frac {a \left (\frac {a c}{g^{2}}\right )^{m - 1} \log \left (-\sin \left (f x + e\right ) + 1\right )}{f g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x, algorithm="fricas")
[Out]
-a*(a*c/g^2)^(m - 1)*log(-sin(f*x + e) + 1)/(f*g)
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((g*cos(f*x+e))**(1-2*m)*(a+a*sin(f*x+e))**m*(c-c*sin(f*x+e))**(-1+m),x)
[Out]
Timed out
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 945 vs.
\(2 (63) = 126\).
time = 1.77, size = 945, normalized size = 16.58 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((g*cos(f*x+e))^(1-2*m)*(a+a*sin(f*x+e))^m*(c-c*sin(f*x+e))^(-1+m),x, algorithm="giac")
[Out]
1/2*(4*pi*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*floor(1/4*(pi + 2*f*
x - 4*pi*floor(1/2*(pi + f*x + e)/pi) + 2*e)/pi)*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*
sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c)
+ 1/4*pi*sgn(g))^2 + 4*pi*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*floo
r(1/2*(pi + f*x + e)/pi)*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*s
gn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2 + 2*p
i*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*sgn(tan(1/2*f*x + 1/2*e)^2 -
1)*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(
c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2 + 3*pi*e^(m*log(abs(a)) +
m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m
*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/
4*pi*sgn(c) + 1/4*pi*sgn(g))^2 - 4*pi*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(a
bs(g)))*floor(1/4*(pi + 2*f*x - 4*pi*floor(1/2*(pi + f*x + e)/pi) + 2*e)/pi) - 4*pi*e^(m*log(abs(a)) + m*log(a
bs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*floor(1/2*(pi + f*x + e)/pi) - 2*pi*e^(m*log(abs(a)) + m
*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*sgn(tan(1/2*f*x + 1/2*e)^2 - 1) - 4*e^(m*log(abs(a
)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)))*log(2*(tan(1/2*f*x + 1/2*e)^2 - 2*tan(1/2*f*
x + 1/2*e) + 1)/(tan(1/2*f*x + 1/2*e)^2 + 1))*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn
(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1
/4*pi*sgn(g)) - 2*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g)) + 1)*tan(1/4*
pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*
m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2 - 3*pi*e^(m*log(abs(a)) + m*log(abs(c)
) - 2*m*log(abs(g)) - log(abs(c)) + log(abs(g))) + 2*e^(m*log(abs(a)) + m*log(abs(c)) - 2*m*log(abs(g)) - log(
abs(c)) + log(abs(g)) + 1))/(f*tan(1/4*pi + pi*m*floor(-1/4*sgn(a) + 1/2) + pi*m*floor(-1/4*sgn(c) + 1) + 1/4*
pi*m*sgn(a) + 1/4*pi*m*sgn(c) - 1/2*pi*m*sgn(g) - pi*floor(-1/4*sgn(c) + 1) - 1/4*pi*sgn(c) + 1/4*pi*sgn(g))^2
+ f)
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int {\left (g\,\cos \left (e+f\,x\right )\right )}^{1-2\,m}\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{m-1} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((g*cos(e + f*x))^(1 - 2*m)*(a + a*sin(e + f*x))^m*(c - c*sin(e + f*x))^(m - 1),x)
[Out]
int((g*cos(e + f*x))^(1 - 2*m)*(a + a*sin(e + f*x))^m*(c - c*sin(e + f*x))^(m - 1), x)
________________________________________________________________________________________